<%-- 
    Document   : addHealthSpringContact
    Created on : Aug 30, 2013, 4:28:33 PM
    Author     : yogesh
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@include file="../common/script.jsp" %>

<script type="text/javaScript">           
    var rules=new Array();
    rules[0]='categoryId|required|please select category'; 
    rules[1]='name|required|please enter name'; 
    rules[2]='email|required|please enter email'; 
    rules[3]='email|email|please enter valid email-id';
    rules[4]='contact1|mask|0123456789';
    rules[5]='contact2|mask|0123456789';
    //by santosh
    rules[6]='kinPhone|mask|0123456789';
            
</script>


<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <%@include file="../common/title.jsp" %>
    </head>
    <body onLoad="yav.init('form1',rules,'inline');">
        <%@include file="../common/header.jsp" %>
        <%@include file="../common/menu.jsp" %>
        <div class="in_02" >
            <%@include file="../common/message.jsp" %>
            <form:form id="form1" modelAttribute="healthSpringContact" method="POST">
                <fieldset>
                    <legend><spring:message code="title.addhealthSpringContact"/></legend>
                    <table class="formTable">
                        <tr>
                            <td>
                                Team:<br/>
                                <form:select path="category.categoryId" name="categoryId" id="categoryId" style="margin-bottom: 5px">
                                    <form:option value="" label="-"></form:option>
                                    <form:options itemLabel="description" itemValue="categoryId" items="${CategoryList}"></form:options>
                                </form:select><br/>
                                <span id="errorsDiv_categoryId"></span>
                            </td>
                            <td><spring:message code="name"/>:<br/><form:input path="name" id="name" class="userInputLarge"/>
                                <br/><span id="errorsDiv_name"></span>
                            </td>
                            <td><spring:message code="contact1"/>:<br/><form:input path="contact1" id="contact1" maxlength="10"  class="userInputLarge"/>
                                <br/><span id="errorsDiv_contact1"></span>
                            </td>



                        </tr>
                        <tr>
                            <td><spring:message code="contact2"/>:<br/><form:input path="contact2" id="contact2" maxlength="10" class="userInputLarge"/>
                                <br/><span id="errorsDiv_name"></span>
                            </td>
                            <td><spring:message code="email"/>:<br/><form:input path="email" id="email" class="userInputLarge"/>
                                <br/><span id="errorsDiv_email"></span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Designation:<br/>
                                <form:select path="designation.designationId" name="designationId" id="designationId" style="margin-bottom: 5px">
                                    <form:option value="" label="-"></form:option>
                                    <form:options itemLabel="designationName" itemValue="designationId" items="${designationList}"></form:options>
                                </form:select><br/>
                                <span id="errorsDiv_categoryId"></span>
                            </td>
                            <td>
                                Location:<br/>
                                <form:select path="healthSpringCenter.centerId" name="centerId" id="centerId" style="margin-bottom: 5px">
                                    <form:option value="" label="-"></form:option>
                                    <form:options itemLabel="centerName" itemValue="centerId" items="${healthSpringCenterList}"></form:options>
                                </form:select><br/>
                                <span id="errorsDiv_categoryId"></span>
                            </td>
                        </tr>
                        <tr>
                            <td>Kin Name:<br><form:input path="kinName" cssClass="userInputLarge"/></td>
                            <td>Kin Phone Number:<br><form:input path="kinPhone" maxlength="10" cssClass="userInputLarge"/></td>
                            <td>Kin Address:<br><form:input path="kinAddress" cssClass="userInputLarge"/></td>
                        </tr>

                        <tr>
                            <td><input type="button" name="Cancel" value="Cancel"  onclick="location.href='../admin/listHealthSpringContact.htm'"></td>                       
                            <td><input type="submit" name="btnSubmit" class="userInputFormSubmit" value="<spring:message code="button.Add"/>" onclick="return yav.performCheck('form1', rules, 'inline');"/></td>
                        </tr>
                    </table>

                    <spring:hasBindErrors name="city">
                        <div class="error">
                            <form:errors path="*"/>
                        </div>
                    </spring:hasBindErrors>
                </fieldset>
            </form:form>
        </div>
    </body>
</html>

